<template>
  <div>
    <p>Count: {{ count }}</p>
    <p>Double Count: {{ doubleCount }}</p>
    <Button type="primary" @click="increment">Increment</Button>
  </div>
</template>

<script setup>
import { storeToRefs } from 'pinia';
import { useCounterStore } from '@/stores/counter';
import { Button } from 'ant-design-vue';
const counterStore = useCounterStore();
const { count, doubleCount } = storeToRefs(counterStore); // 保持响应性
const { increment } = counterStore;
</script>